package com.gee.spring.boot.rpf.util.sys;

import com.gee.spring.boot.rpf.config.cache.SysCacheConfig;
import com.gee.spring.boot.rpf.util.redis.RedisUtil;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * desc:
 *
 * @author gee wrote on  2021-02-12 19:16:03
 */
@Component
public class SysConfigUtil {

    @Resource
    private RedisUtil redisUtil;


    public String getMblNoCarrier(String mblNo){
        if (mblNo == null || mblNo.length() < 3){
            return "OTHER";
        }
        return (String) redisUtil.hget(SysCacheConfig.CACHE_KEY_MBL_NO_CARRIER_MAP, mblNo.substring(0, 3));
    }
}
